package com.example.administrator.exkotlin.base.`object`

open class Student(var score: Int=0, var sex: String="无", name: String="无", age: Int=0) : Person(name, age), IStudy {
    init {
//        println(toString())
    }

    override fun read(books: String?) {
        println(name + "正在读书" + books)

    }

    override fun write(works: String?) {
        println(name + "正在写作业" + works)
    }

//    override fun play(paly: String) {
//        println(name+"正在玩耍"+paly)
//    }
    override fun toString(): String {
        super.toString()
        println("Student(score=$score, sex='$sex')")
        return "Student(score=$score, sex='$sex')"
    }

}